package com.archermind.boc.domain;

import java.util.HashMap;
import java.util.List;

import com.archermind.boc.socket.out.IResponse;
import com.archermind.boc.xml.ApplicationContextFactory;
import com.thoughtworks.xstream.XStream;

public class Message extends BaseDomain implements IResponse {
	private String id;
	private String to;
	private String from;
	private String body;
	private String type;
	private Biz biz;
	private HashMap<String, List<String>> x;
	private static XStream xStream = (XStream) ApplicationContextFactory.getContext().getBean("messageXStream");

	public HashMap<String, List<String>> getX() {
		return x;
	}

	public void setX(HashMap<String, List<String>> x) {
		this.x = x;
	}

	public Biz getBiz() {
		return biz;
	}

	public void setBiz(Biz biz) {
		this.biz = biz;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTo() {
		return to;
	}

	public void setTo(String to) {
		this.to = to;
	}

	public String getFrom() {
		return from;
	}

	public void setFrom(String from) {
		this.from = from;
	}

	public String toXML() {
		return xStream.toXML(this);
	}
}
